home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
PIL
/
ImageChops.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
4KB
|
106 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
import Image
def constant(image, value):
return Image.new('L', image.size, value)
def duplicate(image):
return image.copy()
def invert(image):
image.load()
return image._new(image.im.chop_invert())
def lighter(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_lighter(image2.im))
def darker(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_darker(image2.im))
def difference(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_difference(image2.im))
def multiply(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_multiply(image2.im))
def screen(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_screen(image2.im))
def add(image1, image2, scale = 1, offset = 0):
image1.load()
image2.load()
return image1._new(image1.im.chop_add(image2.im, scale, offset))
def subtract(image1, image2, scale = 1, offset = 0):
image1.load()
image2.load()
return image1._new(image1.im.chop_subtract(image2.im, scale, offset))
def add_modulo(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_add_modulo(image2.im))
def subtract_modulo(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_subtract_modulo(image2.im))
def logical_and(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_and(image2.im))
def logical_or(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_or(image2.im))
def logical_xor(image1, image2):
image1.load()
image2.load()
return image1._new(image1.im.chop_xor(image2.im))
def blend(image1, image2, alpha):
return Image.blend(image1, image2, alpha)
def composite(image1, image2, mask):
return Image.composite(image1, image2, mask)
def offset(image, xoffset, yoffset = None):
if yoffset is None:
yoffset = xoffset
image.load()
return image._new(image.im.offset(xoffset, yoffset))